import type { ArticleData, ArticleResult, SelectData } from "@/types/article"
import { request } from "@/utils/request"


export const getArticleListApi  = (data: ArticleData) => {
  // 返回 Promise
  return request<ArticleResult>('/v1_0/mp/articles', 'GET', data)
}



// 删除文章
export const deleteArticleItemApi = (id: string) => {
    return request( `/v1_0/mp/articles/${id}`, 'DELETE')
}


// 获取频道
export const getChannelOptionsApi  = () => {
  // 返回 Promise
  return request<SelectData>('v1_0/channels', 'GET')
}
